Frame conversions
Orbital elements are supposed known in a terrestrial frame "frozen" at a given time (called "launch" frame) defined by:
The question is then: "what are the orbital elements in ECI?".
Obviously, this question can be answered in a straightforward manner, as only RAAN is changed when changing from the launch frame to ECI. The following example shows the use of a few CelestLab functions.
// ------------ // HYPOTHESES // ------------ // Date/time of frame supposed in TREF time scale: t0 = CL_dat_cal2cjd(2012,12,1,6,0,0); // Longitude defining the X axis: lon0 = -15 * %pi/180; // Orbital elements (sma, ecc, inc, argp, raan, mean anomaly): kep_launch = [7000.e3; 0.1; 1; 0; 0.1; 0]; // Note that all frames are fixed with respect to each other // (All velocities are relative to ECI) // Conversion to position and velocity: [pos_launch, vel_launch] = CL_oe_kep2car(kep_launch); // Frame transformation matrix: ECF to "launch frame" at t0: M1 = CL_rot_angles2matrix(3, lon0); // Frame transformation matrix: "ECF" to "ECI" at t0: M2 = CL_fr_convertMat("ECF", "ECI", t0); // Composition of frame transformations (no relative angular velocities): // "launch frame" -> ECF followed by: ECF -> ECI [M, omega] = CL_rot_compose(M1, [0;0;0], -1, M2, [0;0;0], 1); // omega is [0;0;0], but we can still use: [pos_eci, vel_eci] = CL_rot_pvConvert(pos_launch, vel_launch, M, omega); // Or: // M = M2*M1' // pos_eci = M * pos_launch // vel_eci = M * vel_launch // Convert to orbital elements: kep_eci = CL_oe_car2kep(pos_eci, vel_eci); disp(kep_eci); |